package Practice05.test5;

public class DeanOffice {

    public static void judge(Teacher teacher){
        String teacherClassName = teacher.getClass().getName();
        String teacherName = teacherClassName.substring(teacherClassName.lastIndexOf('.')+1);

        System.out.println(teacherName);
        teacher.giveLesson();
    }

}
